<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<AvansRS.Domain.Group>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

   <h2>Groups</h2>

    <table>
    	<tr>
    		<th>
    			Naam
    		</th>
    		<th>
    			Leider
    		</th>
    		<th>
    			Groep type
    		</th>
    		<th>
    			&nbsp;
    		</th>
    	</tr>
    <%
		 foreach(var group in Model)
		 {
	 %>
		<tr>
			<td><%= Html.Encode(group.Name) %></td>
			<td><%= Html.Encode(group.Leader.Account.UserName) %></td>
			<td><%= Html.Encode(group.GroupType) %></td>
			<td>
				<%= Html.ActionLink("Edit", "Edit", "Group", new { id = group.ID }, null)%>
			</td>
		</tr>
	 <%
		 }
    %>
    </table>  
    <%= Html.ActionLink("Groep toevoegen", "Create", "Group") %>  

</asp:Content>
